#define _CRT_SECURE_NO_WARNINGS 1

#include <string>
using namespace std;

class Solution {
public:
    bool isUnique(string astr) {
        int hash = 0;
        if (astr.size() > 26)
            return false;
        for (auto c : astr)
        {
            if ((hash >> (c - 'a')) & 1)
                return false;
            else
                hash |= 1 << (c - 'a');
        }
        return true;
    }
};